﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.Collections;


namespace WebVideo.Areas.Admin.Models
{
    public class FriendModel
    {
        public int Id { get; set; }      
        public string UserName { get; set; }    
        public string UserNameFriend { get; set; }       
        public string LevelFriend { get; set; }       
        public static IEnumerable<EntityFriend> Index()
        {
            dbVideoDataContext db = new dbVideoDataContext();
            var query = from p in db.EntityFriends.Where(p => p.LevelFriend == null)
                        select p;
            return query.ToList();
        }
        public static IEnumerable<EntityFriend> Level()
        {
            dbVideoDataContext db = new dbVideoDataContext();
            var query = from p in db.EntityFriends.Where(p => p.UserNameFriend == null)
                        select p;
            return query.ToList();
        }  
    }
}